<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>集合操作</title>
	</head>
	<body>
		<script src="index.js"></script>
		<script>
			let set1 = new Set()
			set1.add(1)
			set1.add(2)
			set1.add(3)
			let set2 = new Set()
			set2.add(1)
			set2.add(3)
			set2.add(4)
			console.log('并集', set1.union(set2))
			console.log('交集', set1.intersection(set2))
			console.log('差集', set1.difference(set2))
			console.log('子集', set1.subset(set2))
		</script>
	</body>
</html>
